    const axiox = require('axios');
    const request1 = params =>{
    const instance = axiox.create({
        baseURL:"https://tianqi.moji.com/weather/china",
        timeout:5000
       })   
    return new Promise((resolve,reject) => {
        instance({
            ...params,
            url:params.url,
            timeout: 5000,
        })
        .then(res => resolve(res))
        .catch(err => reject(err))
    })
}


const request2 = params =>{
    return new Promise((resolve,reject)=>{
        axiox({
            url:'http://wufazhuce.com/'
        }).then(res=>{
            resolve(res)
        }).catch(err=>{
            reject(err)
        })
    })
}
module.exports = {
    request1,
    request2
};